﻿<%@ Page Title="Buy Of Comany" Language="C#" MasterPageFile="~/GuestView.master"
    AutoEventWireup="true" CodeBehind="PageBuyOfAccount.aspx.cs" Inherits="BestBuy.PageGuest.PageBuyOfAccount" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <asp:Panel ID="Panel1" runat="server">
        <div class="left-side-bar bs-docs-sidebar">
            <ul class="nav nav-list bs-docs-sidenav">
                <li class="active" style="text-align: center;"><a href="#">Menu Quick</a></li>
                <li>
                    <asp:HyperLink ID="hlProduct" runat="server">
                        <i class="icon-chevron-right"></i>Product Catalog(<asp:Label runat="server" ID="lbCountProduct"></asp:Label>)</asp:HyperLink></li>
                <li>
                    <asp:HyperLink ID="hlSell" runat="server">
                        <i class="icon-chevron-right"></i>Sell Offers(<asp:Label runat="server" ID="lbCountSell"></asp:Label>)</asp:HyperLink></li>
                <li>
                    <asp:HyperLink ID="hlBuy" runat="server">
                        <i class="icon-chevron-right"></i>Buy Offers(<asp:Label runat="server" ID="lbCountBuy"></asp:Label>)</asp:HyperLink></li>
            </ul>
        </div>
    </asp:Panel>
    <div class="main-content">
        <div id="linkQuick" runat="server">
            <a href="../Default.aspx">Home </a>> <a href="bListCategory.aspx">Buy Offers </a>
            >
            <asp:Label ID="lbCompany" runat="server"></asp:Label>
        </div>
        <br />
        <div style="float: right;">
            <asp:Panel ID="pnPhanTrang" runat="server">
                <asp:LinkButton ID="lbtnBegin" runat="server" CssClass="pagePhanTrang" ToolTip="First"
                    Text="<<" OnClick="lbtnBegin_Click"></asp:LinkButton>
                <asp:LinkButton ID="lbtnPre" runat="server" CssClass="pagePhanTrang" ToolTip="Previous"
                    Text="<" OnClick="lbtnPre_Click"></asp:LinkButton>
                <asp:Label ID="lbPages" runat="Server" Text="Pages :"></asp:Label>
                <asp:TextBox ID="txtTrangHienTai" CssClass="txtTrangHienTai" runat="server" Height="13px"
                    Width="50px" MaxLength="7">1</asp:TextBox>
                <span class="canh_deu">/</span>
                <asp:Label ID="lbTrang" runat="server"></asp:Label>
                <asp:RegularExpressionValidator runat="server" ID="valNumbersOnly" CssClass="error"
                    ControlToValidate="txtTrangHienTai" Display="Dynamic" ErrorMessage="Just enter a positive integer."
                    ValidationExpression="(^(?=\d*[1-9])\d+$)">
                </asp:RegularExpressionValidator>
                <asp:LinkButton ID="lbtnNext" runat="server" CssClass="pagePhanTrang" ToolTip="Next"
                    Text=">" OnClick="lbtnNext_Click"></asp:LinkButton>
                <asp:LinkButton ID="lbtnEnd" runat="server" CssClass="pagePhanTrang" ToolTip="Last"
                    Text=">>" OnClick="lbtnEnd_Click"></asp:LinkButton>
                <asp:LinkButton ID="lbtnToi" CssClass="style_button" Style="margin-left: 5px; cursor: pointer;"
                    CausesValidation="True" runat="server" Text="Go" OnClick="lbtnToi_Click">
                </asp:LinkButton>
            </asp:Panel>
        </div>
        <asp:Panel ID="pnEmtry" runat="server">
            <asp:Label ID="lbGridViewEmtry" runat="Server"></asp:Label>
        </asp:Panel>
        <div class="duongvien_pd">
            <asp:GridView ID="gvListProducts" runat="server" HeaderStyle-CssClass="gridview_header"
                CssClass="gv_product_catalogy" DataKeyNames="IDBangTinMua,TieuDe,IDTaiKhoan" AutoGenerateColumns="False"
                GridLines="None" PageSize="15" PagerSettings-FirstPageText="<<">
                <Columns>
                    <asp:TemplateField HeaderText="Check All" HeaderStyle-Width="40">
                        <ItemTemplate>
                            <asp:CheckBox ID="chkXoa" runat="server" />
                        </ItemTemplate>
                        <HeaderTemplate>
                            <input id="chkAll" onclick="javascript:SelectAllCheckboxes(this, 'chkXoa');" runat="server"
                                type="checkbox" name="All" style="color: White; margin: -4px 5px 0px 5px;" />All
                        </HeaderTemplate>
                        <HeaderStyle Width="40px"></HeaderStyle>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderStyle-HorizontalAlign="Left">
                        <HeaderTemplate>
                            <asp:Button ID="btnHeaderContact" runat="server" CssClass="button_contact" Text="Contact Now"
                                OnClick="btnHeaderContact_Click" />
                        </HeaderTemplate>
                        <ItemTemplate>
                            <a id="lbtnTitle" class="lbtnProduct" href='bBuyOfferDetail.aspx?pid=<%#Eval("IDBangTinMua") %>>'>
                                <%#Eval("TieuDe") %></a>
                            <br />
                            <asp:Label ID="lbMinOrder" runat="server" Style="font-size: 12px; color: GrayText;"
                                Text='<%#Eval("NgayDang") %>'></asp:Label>
                            <br />
                            Content: <span>
                                <%#Eval("NoiDung") %></span>
                            <br />
                            Quantity: <span>
                                <%#Eval("SoLuongMua") %>/<%#Eval("DonVi.TenDonVi")%></span><br />
                            Decription: <span>
                                <%#Eval("MoTa") %></span>
                            <br />
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
                    </asp:TemplateField>
                    <asp:TemplateField ItemStyle-Width="150">
                        <HeaderTemplate>
                            <asp:Label ID="lbQuantity" runat="server" Text='<%#LoadCount() %>'></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                            Country:
                            <asp:Image ID="imgCounntry" runat="server" Style="vertical-align:top;" Height="16" Width="20" ImageUrl='<%# "~/Images/Flags/" + Eval("ThongTinTaiKhoan.QuocGia.TenQuocGia") + ".gif" %>'/> 
                            <asp:Label ID="lbCountry" runat="server" Text='<%# Eval("ThongTinTaiKhoan.QuocGia.TenQuocGia") %>'></asp:Label>
                            <br />
                            Company:
                            <asp:Label ID="lbOffline" runat="server" Text='<%# Eval("ThongTinTaiKhoan.CongTy.TenCongTy") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="150px"></ItemStyle>
                    </asp:TemplateField>
                    <asp:TemplateField ItemStyle-Width="70">
                        <HeaderTemplate>
                            Page<asp:Label ID="lbCurrentPage" runat="server" Text='<%#LoadCurrentPage() %>'></asp:Label>
                            of<asp:Label ID="lbTotalPage" runat="server" Text='<%#LoadTotalPage() %>'></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <a id="btnContact" href='PageContactMessage.aspx?ml=2&pid=<%#Eval("IDBangTinMua") %>'
                                class="button_contact">Contact</a>
                        </ItemTemplate>
                        <ItemStyle Width="70px"></ItemStyle>
                    </asp:TemplateField>
                </Columns>
                <HeaderStyle CssClass="gridview_header"></HeaderStyle>
                <PagerSettings FirstPageText="&lt;&lt;"></PagerSettings>
            </asp:GridView>
        </div>
        <div style="height: 200px">
        </div>
    </div>
</asp:Content>
